/*






import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:sqflite/sqflite.dart';




class NotePage extends StatefulWidget {
  @override
  _NotePageState createState() => _NotePageState();
}


class _NotePageState extends State<NotePage> {



  final String mUserName = "userName";
  final _userNameController = new TextEditingController();

    save() async {
      SharedPreferences prefs = await SharedPreferences.getInstance();
      prefs.setString(mUserName, _userNameController.value.text.toString());
    }

    Future get() async {

      var userName;

      SharedPreferences prefs = await SharedPreferences.getInstance();
      userName = prefs.get(mUserName);
      return userName;
    }






  @override
  Widget build(BuildContext context) {
    return new Builder(builder: (BuildContext context) {
      return new Scaffold(
        appBar: AppBar(
          title: Text("笔记"),
        ),
        body:  Text("")

Center(

          child: new Builder(builder: (BuildContext context) {
            return Column(
              children: <Widget>[
                Container(
                  margin: EdgeInsets.all(20),
                  child: TextField(
                    controller: _userNameController,
                    decoration: InputDecoration(
                        contentPadding: const EdgeInsets.only(top: 10.0),
                        icon: Icon(Icons.border_color ,color: Colors.pinkAccent,),
                        labelText: "请输入要内容",
                        helperText: ""),
                  ),

                ),
                RaisedButton(
                    color: Colors.blueAccent,
                    child: Text("保存"),
                    onPressed: () {
                      save();
                      showDialog(
                          context: context,
                          builder: (context) => AlertDialog(
                                title: Text("保存成功"),
                                actions: <Widget>[
                                  new FlatButton(
                                    child: new Text("确定"),
                                    onPressed: () {
                                      Navigator.of(context).pop();
                                    },
                                  ),
                                ],
                              ));
                    }),
                RaisedButton(
                    color: Colors.greenAccent,
                    child: Text("获取"),
                    onPressed: () {
                      Future userName = get();
                      userName.then(( userName) {
                        Scaffold.of(context).showSnackBar(
                            SnackBar(content: Text("数据获取成功：$userName")));
                      });
                    }),
                ListTile(
                  leading: CircleAvatar(
                    backgroundImage: NetworkImage(
                        "http://pics.sc.chinaz.com/files/pic/pic9/201909/zzpic20126.jpg"),
                  ),
                  title: Text("$username"),
                  onTap: () {

                  },
                )
              ],
            );
          }),
        ),


      );
    });
  }
}

*/
